hi_add_subdirectory(persistance)
hi_add_subdirectory(utils)
hi_add_subdirectory(core/optimize)
hi_add_subdirectory(core/infershape)
hi_add_subdirectory(csrc)

hi_cc_library_static(
  NAME
    ai::fmk::graph::aipp_para_utils_static
  SRCS
    image_para_utils.cpp
  DEPS
    huawei::c_sec
)

hi_cc_library_static(
  NAME
    ai::fmk::graph::core_static
  SRCS
    core/cgraph/*.cpp
    core/edge/*.cpp
    core/node/*.cpp
    core/op/*.cpp
    ./attr_value.cpp
    ./attributes_holder.cpp
    ./buffer.cpp
    ./compute_graph_builder.cpp
    ./graph.cpp
    ./graph_impl.cpp
    ./model.cpp
    ./operator.cpp
    ./operator_impl.cpp
    ./shape.cpp
    ./tensor.cpp
    ./ascend_string.cpp
  CDEFS
    GRAPH_API_VISIABLE
  DEPS
    hiai::api::ops
    hiai::inc::ops
  COPTS
    -frtti
)

# libhiai_ir.so
hi_cc_library_shared(
  NAME
    ai::fmk::hiai_ir_shared
  WHOLE_STATIC_LIBS
    ai::infra::log
    huawei::c_sec
    ai::fmk::graph::core_static
    ai::fmk::graph::aipp_para_utils_static
    ai::fmk::graph::core::optimize_static
    ai::fmk::graph::core::infer_initializer_static
    ai::fmk::graph::utils_static
    ai::fmk::compatible_static
    ai::fmk::unified_model_static
    ai::fmk::common::om_file_helper_static
    ai::fmk::common::model_serialize_wrapper_static
    ai::infra::math::fp16_t_static
    ai::fmk::base::common::tensor_utils_static
)

hi_cc_function(STATIC_IR_GRAPH_PROTO
  NAME
    ai::fmk::hiai_ir_shared
  WHOLE_STATIC_LIBS
    ai::fmk::graph::persistance::proto_impl_static
    ai::fmk::graph::persistance::static_proxy_static
    ai::fmk::graph::persistance::proto_impl::ge_ir_static
    google::protobuf_lite_static
)

hi_target_output_name(ai::fmk::hiai_ir_shared hiai_ir)